<template>
    <div class="big-box">
        <div class="header">
            <img src="../../../../../assets/bigScreen/header1.png" alt="" />
            <div class="backBox" @click="goBack"></div>
        </div>
        <div class="backToBox">
            <div class="backTo" @click="gotoHome">
                <div>返回总窗口</div>
            </div>
            <div class="backTo" @click="backToOne">
                <div>返回上一页</div>
            </div>
        </div>
        <div class="centerBox">
            <div class="sreenTitle">{{tabAct==0?'现有平台':'现有人才'}}</div>
            <div class="center">

                <div class="search_box" v-if="tabAct == 0">
                    <div class="search_box_top">
                        <div class="search_box_top_title"></div>
                        <div>
                            <a-input-search v-model:value="value" placeholder="请输入关键词" enter-button="搜索机构" @search="onSearch" style="width: 50rem" />
                        </div>
                    </div>
                    <div class="search_box_middle1" style="background: ;padding-bottom: 0;">
                        <div style="width: 85%;">
                            <div class="search_box_middle_item">
                                <div class="search_box_middle_item_name">机构类目</div>
                                <div class="search_box_middle_item_tag">
                                    <div :class="orgTypeIndex == index ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        v-for="(item, index) in orgTypeList" @click="orgTypeIndex = index; params.number = 1; getList()" :key="index">
                                        {{ item.name }}
                                    </div>
                                </div>
                                <div class="search_box_middle_item_more"></div>
                            </div>
                            <div class="search_box_middle_item">
                                <div class="search_box_middle_item_name">行业类目</div>
                                <div class="search_box_middle_item_tag" :style="{ height: showMore ? 'initial' : 'initial', width: '92%' }">
                                    <div :class="fieldIndex == -1 ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        @click="fieldIndex = -1; params.number = 1; getList()">全部</div>
                                    <div :class="index == fieldIndex ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        v-for="(item, index) in fieldList" @click="fieldIndex = index; params.number = 1; getList()" :key="index">
                                        {{ item.name }}
                                    </div>
                                </div>
                                <!-- <div class="search_box_middle_item_more" @click="showMore = !showMore">更多分类
                                </div> -->
                            </div>
                        </div>
                        <div class="p-num" style="top: 12rem;">
                            <!-- <p>现有专家人数</p>
                            <p><span>{{ perParams.total }}</span>人</p> -->
                            <div class="p-num-top">
                                <div style="font-size: 3.6rem">{{ orgTotalNumber }}</div>
                                <div>科研机构总数</div>
                            </div>
                            <div class="p-num-bottom" v-if="orgTypeIndex != 0">
                                <div class="p-num-bottom-img">
                                    <img src="../../../../../assets/total-icon.png" alt="" />
                                </div>
                                <div class="p-num-bottom-total">
                                    <div style="color: #037AFF;font-size: 2.4rem">{{ params.total }}</div>
                                    <div>{{ orgTypeList.filter(item => { return item.type == orgTypeIndex })[0].name }}数</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="search_box_bottom" v-if="orgList.length">
                        <!-- <div class="search_box_bottom_title">机构记录</div> -->
                        <div class="search_box_bottom_content">
                            <div class="search_box_bottom_content_item" v-for="(item, index) in orgList" @click="goOrgDetail(item.id)">
                                <div class="search_box_bottom_content_item_left">
                                    <img v-if="item.imgUrls" :src="item.imgUrls[0] == '/' ? baseURL + item.imgUrls : item.imgUrls" alt="暂无图片" style="width:100%;height:100%" />
                                <img v-else src="../../../../../assets/org_default.png" alt="">
                                    <!-- 							<img :src="item.imgUrls" alt="" v-if="item.imgUrls" style="width:100%;height:100%">
							<img src="../../../../../assets/org_default.png" alt="" v-else style="width:100%;height:100%"> -->
                                </div>
                                <div class="search_box_bottom_content_item_right">
                                    <div class="item_title">
                                        <img v-if="orgTypeIndex == '9' || orgTypeIndex == '7' || orgTypeIndex == '10' || orgTypeIndex == '11'"
                                            src="../../../../../assets/news.png" alt="" style="width: 4rem;">
                                        <span style="margin-left: 0.5rem;">{{ item.name ? item.name.length > 20 ? item.name.slice(0,
                                    19) : item.name : '' }}</span>
                                    </div>
                                    <div class="item_content">{{ item.address }}</div>
                                    <div class="item_info">
                                        <div class="item_info_item">
                                            <img src="../../../../../assets/phone.png" alt="" style="width:1.8rem;height:1.8rem;margin-top:0.5rem">
                                            <div style="margin-left: 1rem;">联系电话：{{ item.phone }}</div>
                                        </div>
                                        <div class="item_info_item">
                                            <!-- <img src="../../../../../assets/time.png" alt=""
										style="width:1.8rem;height:1.8rem;margin-top:0.5rem">
									<div style="margin-left: 1rem;">成立时间：{{item.time}}</div> -->
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="text-align: center;padding: 5rem 0;" v-if="orgList.length">
                        <a-pagination :showSizeChanger='false' v-model:current="params.number" v-model:pageSize="params.size" :total="params.total"
                            @change="onShowSizeChange" />
                    </div>
                    <no-Data v-else />
                </div>
                <div class="search_box p-box" v-else>
                    <div class="search_box_middle1" style="background: transparent;padding: 0 3.2rem;padding-bottom: 0;">
                        <div style="width: 95%;">
                            <div class="search_box_middle_item" style="align-items: normal;">
                                <div class="search_box_middle_item_name">人才分类：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;">
                                    <div :class="talentsTypeIndex == item.type ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        v-for="(item, index) in talentsTypeList" @click="talentsTypeIndex = item.type; perParams.number = 1;getPerson()"
                                        :key="index">
                                        {{ item.name }}
                                    </div>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;">
                                </div>
                            </div>
                            <div v-if="talentsTypeIndex == 0" class="search_box_middle_item" style="align-items: normal;">
                                <div class="search_box_middle_item_name">专家职称：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;">
                                    <div :class="perTypeIndex == index ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        v-for="(item, index) in perTypeList" @click="perTypeIndex = index; perParams.number = 1;getPerson()"
                                        :key="index">
                                        {{ item.name }}
                                    </div>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;">
                                </div>
                            </div>
                            <div v-if="talentsTypeIndex == 0" class="search_box_middle_item">
                                <div class="search_box_middle_item_name">技术领域：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;justify-content: left;align-items: start;">
                                    <div class="search_box_middle_item_tagItem active"
                                        @click="technical = undefined;perParams.number = 1; getPerson()">
                                        不限</div>
                                    <a-select style="width: 30rem;margin-left: 1rem;" v-model:value="technical" placeholder="请选择"
                                        @change="getService">
                                        <a-select-option :value="item" v-for="(item, index) in exportDomainList" :key="index">
                                            {{ item }}
                                        </a-select-option>
                                    </a-select>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;"></div>
                            </div>
                            <div class="search_box_middle_item" style="align-items: normal;">
                                <div class="search_box_middle_item_name">所在地区：</div>
                                <div class="search_box_middle_item_tag" style="width: 75%;">
                                    <div :class="areaIndex == index ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        v-for="(item, index) in areaList[0].children" @click="areaIndex = index;perParams.number = 1;getOrg()" :key="index">
                                        <span v-if="item.name == '市直属'">{{ areaList[0].name }}</span>
                                        <span v-else>{{ item.name }}</span>
                                    </div>
                                    <div :class="areaIndex == -1 ? 'search_box_middle_item_tagItem active' : 'search_box_middle_item_tagItem'"
                                        @click="areaIndex = -1;perParams.number = 1;getOrg()">
                                        <span>其他</span>
                                    </div>
                                </div>
                                <div class="search_box_middle_item_more" style="width: 20%;">
                                </div>
                            </div>
                        </div>
                        <div class="p-num">
                            <!-- <p>现有专家人数</p>
                            <p><span>{{ perParams.total }}</span>人</p> -->
                            <div class="p-num-top">
                                <div style="font-size: 3.6rem">{{ totalNumber }}</div>
                                <div>科研人才总数</div>
                            </div>
                            <div class="p-num-bottom">
                                <div class="p-num-bottom-img">
                                    <img src="../../../../../assets/total-icon.png" alt="" />
                                </div>
                                <div class="p-num-bottom-total">
                                    <div style="color: #037AFF;font-size: 2.4rem">{{ talentsTypeList.filter(item => { return item.type == talentsTypeIndex })[0].name == '青年科技人才' && areaIndex == 0 ? Number(perParams.total) + 64 : perParams.total }}</div>
                                    <!-- <div>{{ talentsTypeList[talentsTypeIndex].name }}数</div> -->
                                    <div>{{ talentsTypeList.filter(item => { return item.type == talentsTypeIndex })[0].name }}数</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="personnel-list" v-if="perList.length">
                        <div class="personnel-item" v-for="(item, index) in perList" :key="index" @click="toPagePeople(item.id)">
                            <img v-if="item[filedTypeList[talentsTypeIndex].filed1]" :src="item[filedTypeList[talentsTypeIndex].filed1][0] == '/' ? baseURL + item[filedTypeList[talentsTypeIndex].filed1] : item[filedTypeList[talentsTypeIndex].filed1]"
                                alt="暂无图片" />
                            <img src="../../../../../assets/photo.png" v-else alt="">
                            <div class="personnel-massage">
                                <div>
                                    <span class="name">{{ item[filedTypeList[talentsTypeIndex].filed2].length > 8 ? item[filedTypeList[talentsTypeIndex].filed2].slice(0, 8) + '...' : item[filedTypeList[talentsTypeIndex].filed2] }}</span>
                                    {{ item[filedTypeList[talentsTypeIndex].filed3] }}
                                </div>
                                <div v-if="item[filedTypeList[talentsTypeIndex].filed4]">
                                    <span class="label">{{ item[filedTypeList[talentsTypeIndex].filed4] }}</span>
                                </div>
                                <div>{{ item[filedTypeList[talentsTypeIndex].filed5] }}</div>
                                <div style="margin-top: 1rem;">{{ item[filedTypeList[talentsTypeIndex].filed6] }}</div>
                            </div>
                        </div>
                    </div>
                    <div style="text-align: center;padding: 5rem 0;" v-if="perList.length">
                        <a-pagination :showSizeChanger='false' v-model:current="perParams.number" v-model:pageSize="perParams.size" :total="perParams.total"
                            @change="onShowSizeChange1" />
                    </div>
                    <noData v-else />
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import { baseUrl } from '../../../../../../config';
// import headerBox from "../../../../../components/header.vue"
// import headerImg from "../../../../../components/headerImg.vue"
// import footerBox from "../../../../../components/footer-box.vue"
// import actTabs from "./components/act-tabs.vue"
import noData from "../../../no-data.vue"
import {
    getResearchOrganization,
    getTechField,
    getExportDomain,
    getExportLabel,
    getExpert,
    getArea,
    getGrasslandPersonList,
    getAcademicianPersonList,
    getInnovatePersonList,
    getStartBusinessPersonList,
    getCompanySpecialPersonList,
    getIntroducePersonList,
    getHighEndPersonList,
    getPersonNumber,
    getLeaderPersonList,
    getYoungPersonList,
    getHighSchoolList,
    getOrgTotalNumber
} from "../../../../../api/scientificResearch.js"
import { correspondent } from "../../../../../api/orgService";
import { getAgentListMore } from '../../../../../api/gain.js';
import { getInvestor } from "../../../../../api/capital"
import { financialAdvisor } from '../../../../../api/capital.js';
import { getarea } from "../../../../../api/home.js"
export default {
    components: {
        // headerBox,
        // actTabs,
        // headerImg,
        // footerBox,
        noData
    },
    data() {
        return {
            baseURL: undefined,
            params: {
                number: 1,
                size: 10,
                total: 0,
            },
            perParams: {
                number: 1,
                size: 12,
                total: 0,
            },

            technical: undefined,
            label: undefined,

            current: 1,
            tabList: ['科研机构', '科研人才'],
            tabAct: 0,
            orgList: [],
            fieldList: [],
            exportDomainList: [],
            exportLabelList: [],
            areainfo: [],
            cityList: [],
            orgTypeList: [{
                name: '全部',
                type: 0
            }, {
                name: '自治区重点实验室',
                type: 1
            }, {
                name: '技术创新中心',
                type: 2
            }, {
                name: '高新技术企业',
                type: 3
            }, {
                name: '科技型中小企业',
                type: 4
            }, {
                name: '企业研究开发中心',
                type: 5
            }, {
                name: '临床医学研究中心',
                type: 6
            }, {
                name: '成果转移转化示范区',
                type: 7
            }, {
                name: '成果平台',
                type: 8
            }, {
                name: '国家重点实验室',
                type: 9
            }, {
                name: '成果转移转化示范基地',
                type: 10
            }, {
                name: '中试熟化',
                type: 11
            },{
                name: '高新技术产业开发区',
                type: 12
            },  {
                name: '新型研发机构',
                type: 13
            }, {
                name: '年度科技领军企业',
                type: 14
            }],
            perTypeList: [{
                name: '全部',
                type: 0
            }, {
                name: '教授',
                type: 1
            }, {
                name: '博士生导师',
                type: 2
            }, {
                name: '总工程师',
                type: 3
            }, {
                name: '主管',
                type: 4
            }, {
                name: '研发工程师',
                type: 5
            }, {
                name: '工程师',
                type: 6
            }, {
                name: '版权事务部主管',
                type: 7
            }, {
                name: '专利主管',
                type: 8
            }, {
                name: '高级工程师',
                type: 9
            }, {
                name: '研究员',
                type: 10
            }],
            areaList: [{ children: [] }],
            areaIndex: 0,
            headerKey: 0,
            showMore: false,
            fieldIndex: -1,
            orgTypeIndex: 0,
            perTypeIndex: 0,

            value: '',
            value1: '',
            value2: '',
            value3: '',
            tabKey: 0,
            perList: [],
            total: null,
            technical: undefined,
            province: undefined,
            city: undefined,
            talentsTypeList: [
                {
                    name: '高端人才',
                    type: 8
                },
                {
                    name: '院士专家工作站',
                    type: 9
                },
                {
                    name: '“草原英才”领军人才',
                    type: 12
                },
                {
                    name: '“草原英才”高层次创新型人才',
                    type: 6
                },
                {
                    name: '“绿色通道”引进人才',
                    type: 7
                }, 
                {
                    name: '“草原英才”创新团队',
                    type: 10
                }, 
                {
                    name: '“草原英才”创业团队',
                    type: 11
                },
                {
                    name: '青年科技人才',
                    type: 13
                },
                {
                    name: '科技特派员',
                    type: 3
                }, 
                {
                    name: '技术经纪人',
                    type: 5
                }, 
                {
                    name: '投资人',
                    type: 1
                }, 
                {
                    name: '金融顾问',
                    type: 2
                }, 
                {
                    name: '企业科技特派员',
                    type: 4
                },
                {
                    name: '高校及科研院所',
                    type: 14
                },
                // {
                //     name: '专家',
                //     type: 0
                // }
            ],
            talentsTypeIndex: 8,
            // 动态列表，index与上方的talentsTypeList的type顺序对应
            filedTypeList: [
                // 专家
                {
                    filed1: 'image',
                    filed2: 'name',
                    filed3: 'professionalTitle',
                    filed4: 'technical',
                    filed5: 'unit',
                    filed6: 'phone',
                },
                // 投资人
                {
                    filed1: 'image',
                    filed2: 'name',
                    filed3: 'filed3',
                    filed4: 'filed4',
                    filed5: 'duties',
                    filed6: 'filed6',
                },
                // 金融顾问
                {
                    filed1: 'photo',
                    filed2: 'name',
                    filed3: 'position',
                    filed4: 'filed4',
                    filed5: 'organization',
                    filed6: 'mobile',
                },
                // 科技特派员
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'filed3',
                    filed4: 'serveIndustry',
                    filed5: 'deptName',
                    filed6: 'filed6',
                },
                // 企业科技特派员
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'title',
                    filed4: 'educationAttainment',
                    filed5: 'workUnit',
                    filed6: 'filed6',
                },
                // 技术经纪人
                {
                    filed1: 'logo',
                    filed2: 'name',
                    filed3: 'filed3',
                    filed4: 'type',
                    filed5: 'work',
                    filed6: 'tel',
                },
                // 高层次创新型人才
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'position',
                    filed4: 'majorStudied',
                    filed5: 'reportingUnit',
                    filed6: 'tel',
                },
                // 引进人才
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'technicalQualification',
                    filed4: 'researchField',
                    filed5: 'intoInstitutionsName',
                    filed6: 'tel',
                },
                // 高端人才
                {
                    filed1: 'image',
                    filed2: 'name',
                    filed3: 'education',
                    filed4: 'major',
                    filed5: 'unit',
                    filed6: 'phone',
                },
                // 院士专家工作站
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'filed3',
                    filed4: 'fields',
                    filed5: 'supportUnit',
                    filed6: 'filed6',
                },
                // 创新团队
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'position',
                    filed4: 'innovationAreas',
                    filed5: 'unit',
                    filed6: 'tel',
                },
                // 创业团队
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'position',
                    filed4: 'entrepreneurialField',
                    filed5: 'unit',
                    filed6: 'tel',
                },
                // 领军人才
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'position',
                    filed4: 'majorStudied',
                    filed5: 'reportingUnit',
                    filed6: 'tel',
                },
                // 青年科技人才
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'title',
                    filed4: 'fields',
                    filed5: 'workUnit',
                    filed6: 'tel',
                },
                // 高校及科研院所
                {
                    filed1: 'filed1',
                    filed2: 'name',
                    filed3: 'title',
                    filed4: 'fields',
                    filed5: 'unit',
                    filed6: 'tel',
                },
            ],
            totalNumber: 0,
            orgTotalNumber: 0
        }
    },
    mounted() {
        this.baseURL = baseUrl
        if (this.$route.query.tabAct) {
            this.tabAct = this.$route.query.tabAct;
            this.tabKey++
        }
        // orgTypeList/
        if (this.$route.query.orgClass) {
            for (var i in this.orgTypeList) {
                if (this.orgTypeList[i].name == this.$route.query.orgClass) {
                    this.orgTypeIndex = i
                }
            }
        }
        if (this.$route.query.typeIndex) {
            this.orgTypeIndex = this.$route.query.typeIndex
        }
        // console.log(this.tabAct);
        this.init();
        this.setTabIndex(this.tabAct);
        this.getPersonTotalNumber()
        this._getOrgTotalNumber()
    },
    methods: {
        _getOrgTotalNumber() {
            getOrgTotalNumber().then(res => {
                if(res.code == 200) {
                    this.orgTotalNumber = res.data
                }
            })
        },
        getPersonTotalNumber() {
            getPersonNumber().then(res => {
                if(res.code == 200) {
                    this.totalNumber = res.data
                }
            })
        },
        setTabIndex(index) {
            localStorage.setItem('tabAct', index)
        },
        onShowSizeChange(current, pageSize) {
            this.params.number = current
            this.params.size = pageSize
            this.getList()
        },
        onShowSizeChange1(current, pageSize) {
            this.perParams.number = current
            this.perParams.size = pageSize
            this.getPerson()
        },
        toPagePeople(item) {
            this.$router.push({
                path: '/bigScreen/resourcesExpert',
                query: {
                    tabAct: this.tabAct,
                    id: item,
                    personType: this.talentsTypeIndex
                }
            })
        },
        onSearch() {
            this.params.number = 1
            this.getList()
        },
        changeTab(k) {
            this.tabAct = k;
            this.setTabIndex(k)
        },
        getService(e) {
            console.log(e);
            // this.technical = e;
            // this.getCity(e);
            this.getPerson();
        },
        getOrg() {
            var orgInfo = {}
            if (this.areaIndex == -1) {
                orgInfo = {}
            } else if (this.areaIndex == 0) {
                orgInfo = { orgId: '', areaIndex: this.areaIndex, areaName: '' }
            } else {
                orgInfo = { orgId: this.areaList[0].children[this.areaIndex].id, areaIndex: this.areaIndex, areaName: '' }
            }
            // localStorage.setItem('orgInfo', JSON.stringify(orgInfo))
            this.getPerson();
            this.headerKey++
        },
        getPerson() {
            let datas = {
                size: this.perParams.size,
                number: this.perParams.number,
                professionalTitle: this.perTypeIndex == 0 ? '' : this.perTypeList[this.perTypeIndex].name,
                allFlag: this.areaIndex == 0 ? 1 : '',
                orgId: this.areaList[0].children.length > 0 ? this.areaList[0].children[this.areaIndex].id : '',
                technical: this.technical,
                label: this.label
            }
            switch(this.talentsTypeIndex) {
                // 专家
                case 0:
                    if (this.areaIndex == -1) {
                        datas.orgFlag = '0'
                    }
                    getExpert(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list;
                            this.total = res.data.total;
                            this.perParams.total = res.data.total ? res.data.total : 0;
                            // this.perList.map(v => {
                            // 	v.time = v.establishTime.substring(0, 10)
                            // })
                        }
                    })
                    break
                // 投资人
                case 1:
                    getInvestor(datas).then((res) => {
                        if (res.code == 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 金融顾问
                case 2:
                    if(this.areaIndex == -1){
                        datas.orgFlag = '0'
                    }
                    financialAdvisor(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 科技特派员
                case 3:
                    correspondent(datas).then((res) => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 企业科技特派员
                case 4:
                    getCompanySpecialPersonList(datas).then((res) => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 技术经纪人
                case 5:
                    if(this.areaIndex==-1){
                        datas.orgFlag = '0'
                    }
                    getAgentListMore(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 高层次创新型人才
                case 6:
                    getGrasslandPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 引进人才
                case 7:
                    getIntroducePersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 高端人才
                case 8:
                    getHighEndPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 院士专家工作站
                case 9:
                    getAcademicianPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 创新团队
                case 10:
                    getInnovatePersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 创业团队
                case 11:
                    getStartBusinessPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 领军人才
                case 12:
                    getLeaderPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 青年科技人才
                case 13:
                    getYoungPersonList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
                // 高校及科研院所
                case 14:
                    getHighSchoolList(datas).then(res => {
                        if (res.code === 200) {
                            this.perList = res.data.list
                            this.perParams.total = res.data.total ? res.data.total : 0;
                        }
                    })
                    break
            }
        },
        getList() {
            var datas = {
                size: this.params.size,
                number: this.params.number,
                industry: this.fieldIndex == -1 ? '' : this.fieldList[this.fieldIndex].name,
                name: this.value,
                orgClass: this.orgTypeIndex == 0 ? '' : this.orgTypeList[this.orgTypeIndex].name
            }
            getResearchOrganization(datas).then(res => {
                if (res.code === 200) {
                    this.orgList = res.data.list;
                    this.orgList.map(v => {
                        // v.time = v.establishTime.substring(0, 10)
                    })
                    this.params.total = res.data.total ? res.data.total : 0;
                    console.log(res);
                }
            })
        },
        getCity(id) {
            // 2级
            getArea({
                arealevel: 2,
                parentId: id
            }).then(res => {
                if (res.code == 200) {
                    this.cityList = res.data
                }
            })
        },
        init() {
            getExportDomain().then(res => {
                if (res.code == 200) {
                    this.exportDomainList = res.data;
                }
            })
            getExportLabel().then(res => {
                if (res.code == 200) {
                    this.exportLabelList = res.data;
                }
            })
            getTechField().then(res => {
                if (res.code === 200) {
                    this.fieldList = res.data;
                }
            })
            // 一级
            getArea({
                arealevel: 1
            }).then(res => {
                if (res.code == 200) {
                    this.areainfo = res.data
                }
            })
            getarea({}).then((res) => {
                if (res.code == 200) {
                    this.areaList = res.data
                    this.areaList[0].children.unshift({
                        name: '全部',
                        id: ''
                    })
                    if (localStorage.getItem('orgInfo')) {
                        // this.areaIndex = JSON.parse(localStorage.getItem('orgInfo')).areaIndex
                        // msName.value = areadata.value[0].children[areaIndex].name
                    }
                }
            })
            this.getList();
            this.getPerson();
        },
        goOrgDetail(id) {
            console.log(id);
            this.$router.push({
                path: '/bigScreen/resourcesOrganization',
                query: {
                    id: id
                }
            })
        },
        gotoHome() {
            this.$router.push({
                path: '/bigScreenIndex',
            })
        },
        backToOne() {
            console.log('11');
            this.$router.go(-1)
        },
        goBack() {
            this.$router.push('/chart')
        }
    }
}
</script>


<style scoped lang="scss">
@font-face {
    font-family: "ffa";
    src: url(../../../assets/bigScreen/fonts/DS-DIGIB.TTF);
}
ul,
li {
    list-style: none;
}
.big-box {
    background-color: #071c3b;
    height: 100vh;
}
.header {
    position: relative;
    text-align: center;
    position: relative;
    height: 19.1rem;

    .backBox {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70rem;
        height: 10rem;
        cursor: pointer;
    }

    > img {
        width: 100%;
        max-height: 100%;
        margin-top: -1.1rem;
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -o-crisp-edges; /* Opera */
        image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
        image-rendering: crisp-edges;
        -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
    }
}
.centerBox {
    width: 96%;
    margin: 0 auto;
    position: absolute;
    top: 14rem;
    left: 2%;
    .sreenTitle {
        background-image: url("../../../../../assets/bigScreen/sreenTitle.png");
        background-size: 100% 100%;
        height: 3.8rem;
        padding-left: 35px;
        font-weight: 600;
        color: #fff;
        display: flex;
        align-items: center;
    }
    .center {
        margin-top: 1rem;
        height: calc(100vh - 20rem);
        border: 1px solid;
        border-image: linear-gradient(
                130deg,
                #2385df 0%,
                rgba(35, 133, 223, 0.65) 92%
            )
            1;
        overflow-y: scroll;
        padding: 20px;
        .search_box {
            width: 140rem;
            // background: #ffffff;
            margin: 3rem auto 0;
            padding: 3rem 4rem 0rem;

            .personnel-list {
                display: flex;
                flex-wrap: wrap;

                .personnel-item {
                    width: 42rem;
                    margin: 3rem 1rem 0;
                    min-height: 15.6rem;
                    border-radius: 0.8rem;
                    background: #082853;
                    border: 1px solid #4494ff46;
                    display: flex;
                    padding: 2.5rem 4rem;
                    padding: 2.5rem 1rem 2.5rem 4rem;
                    cursor: pointer;
                    color: #fff;

                    .personnel-massage {
                        font-family: PingFangSC-Regular;
                        font-size: 1.6rem;
                        font-weight: normal;
                        line-height: 1.9rem;
                        color: rgb(218, 218, 218);
                        display: block;

                        > div {
                            display: flex;
                            align-items: center;
                            width: 100%;
                        }

                        .label {
                            border-radius: 0.4rem;
                            margin: 1.6rem 0;
                            padding: 0.6rem 0.8rem;
                            color: #fff;
                            background: #037aff;
                        }

                        .name {
                            width: 10rem;
                            font-family: PingFangSC-Semibold;
                            font-size: 2.4rem;
                            min-height: 2.4rem;
                            line-height: 2.4rem;
                            font-weight: normal;
                            color: #fff;
                            margin-right: 2rem;
                            overflow: hidden; //溢出内容隐藏
                            text-overflow: ellipsis; //文本溢出部分用省略号表示
                            display: -webkit-box; //特别显示模式
                            -webkit-line-clamp: 2; //行数
                            line-clamp: 2;
                            -webkit-box-orient: vertical; //盒子中内容竖直排列
                        }
                    }

                    img {
                        width: 10rem;
                        height: 10rem;
                        border-radius: 50%;
                        margin-right: 3rem;
                    }
                }
            }

            .search_box_top {
                display: flex;
                justify-content: space-between;
                align-content: center;
                padding-bottom: 3rem;
                margin-bottom: 3rem;
                border-bottom: 0.1rem solid #4494ff46;

                .search_box_top_title {
                    font-size: 2.4rem;
                    color: #037aff;
                }
            }

            .search_box_middle1 {
                // padding: 2rem 0 0 0;
                position: relative;

                .p-num {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    position: absolute;
                    right: 0;
                    top: 2.5rem;
                    width: 20%;
                    // height: 30rem;
                    border-left: 1px solid #D8D8D8;
                    color: #888888;
                    font-size: 1.8rem;
                    text-align: center;

                    .p-num-top {
                        display: flex;
                        flex-direction: column;
                        // justify-content: center;
                        align-items: center;
                        width: 12.5rem;
                        height: 12.5rem;
                        background: url('../../../../../assets/total-bg.png') no-repeat;
                        background-position: center center;
                        background-size: 100% 100%;
                        color: #037AFF;
                        font-size: 1.4rem;
                        padding-top: 1.5rem;
                    }

                    .p-num-bottom {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        padding: 1.1rem 1.3rem;
                        background: #E2F2FF;
                        border-radius: 7px;
                        margin-top: 1.3rem;

                        .p-num-bottom-img {
                            width: 4rem;
                            height: 4rem;

                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }

                        .p-num-bottom-total {
                            display: flex;
                            flex-direction: column;
                            align-items: center;
                            color: #181818;
                            font-size: 1.4rem;
                            margin-left: 1rem;
                        }
                    }

                    span {
                        font-size: 3.6rem;
                        color: #CE0000;
                        margin-top: 2.8rem
                    }
                }

                .search_box_middle_item {
                    display: flex;
                    justify-content: space-between;
                    align-items: start;
                    // padding-bottom: 3rem;

                    .search_box_middle_item_name {
                        width: 8%;
                        font-size: 1.8rem;
                        color: #fff;
                    }

                    .search_box_middle_item_tag {
                        width: 84%;
                        display: flex;
                        flex-wrap: wrap;
                        overflow: hidden;
                        // justify-content: space-between;

                        .search_box_middle_item_tagItem {
                            font-size: 1.6rem;
                            color: rgba(255, 255, 255, 0.85);
                            cursor: pointer;
                            margin-right: 3rem;
                            margin-bottom: 3rem;
                        }

                        .active {
                            border-radius: 0.4rem;
                            // background: rgba(3, 122, 255, 0.1);
                            // color: #037AFF;
                            background: #037aff !important;
                            color: #ffffff !important;
                            padding: 0.3rem 1.4rem;
                        }
                    }

                    .search_box_middle_item_more {
                        width: 10%;
                        font-size: 1.6rem;
                        color: #037aff;
                        text-align: right;
                        display: flex;
                        align-items: center;
                        justify-content: flex-end;
                        cursor: pointer;

                        img {
                            margin-left: 1rem;
                        }
                    }
                }
            }

            .search_box_bottom {
                .search_box_bottom_title {
                    font-size: 2.4rem;
                    color: #037aff;
                }

                .search_box_bottom_content {
                    display: flex;
                    justify-content: space-between;
                    flex-wrap: wrap;
                    padding-top: 1.4rem;

                    .search_box_bottom_content_item {
                        display: flex;
                        justify-content: left;
                        align-items: center;
                        width: 65rem;
                        height: 16rem;
                        border-radius: 8px;
                        background-color: #082853;
                        // background: linear-gradient(180deg, rgba(245, 248, 252, 0.70) 0%, #FFFFFF 100%);
                        box-sizing: border-box;
                        border: 0.1rem solid #4494ff46;
                        // box-shadow: 8px 8px 20px 0rem rgba(231, 237, 247, 0.51);
                        margin-bottom: 2rem;
                        padding: 2rem;
                        cursor: pointer;
                        color: #fff;

                        .search_box_bottom_content_item_left {
                            width: 12rem;
                            height: 12rem;
                        }

                        .search_box_bottom_content_item_right {
                            display: flex;
                            justify-content: space-between;
                            flex-direction: column;
                            height: 100%;
                            width: calc(100% - 14rem);
                            margin-left: 2rem;

                            color: #fff;
                            .item_title {
                                display: flex;
                                align-items: center;
                                font-size: 2rem;
                                color: #fff;
                            }

                            .item_content {
                                font-size: 1.6rem;
                                color: rgba(255, 255, 255, 0.85);
                                text-overflow: -o-ellipsis-lastline;
                                overflow: hidden; //溢出内容隐藏
                                text-overflow: ellipsis; //文本溢出部分用省略号表示
                                display: -webkit-box; //特别显示模式
                                -webkit-line-clamp: 2; //行数
                                line-clamp: 2;
                                -webkit-box-orient: vertical; //盒子中内容竖直排列
                            }

                            .item_info {
                                display: flex;
                                justify-content: space-between;
                                font-size: 1.6rem;
                                color: #fff;

                                .item_info_item {
                                    display: flex;
                                    // align-items: center;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    ::-webkit-scrollbar {
        width: 5px;
        height: 10px;
    }

    /* 滚动条轨道 */
    ::-webkit-scrollbar-track {
        background-color: #234470;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        background-color: #061c57;
    }

    /* 鼠标悬停在滚动条上的滑块 */
    ::-webkit-scrollbar-thumb:hover {
        background-color: #555;
    }
}
.backToBox {
    position: absolute;
    top: 8rem;
    right: 2%;
    display: flex;
    .backTo {
        background-image: url("../../../../../assets/bigScreen/backTo.png");
        color: #2dccff;
        background-size: 100% 100%;
        width: fit-content;
        padding: 2px 40px 10px 10px;
        font-weight: 600;
        cursor: pointer;
        margin-left: 10px;
        div {
            padding-top: 5px;
        }
    }
}
::v-deep {
    .ant-btn-primary {
        border-color: #037aff;
        background: #037aff;
    }

    .ant-input {
        background: rgba(68, 148, 255, 0.12);
        border: none;
        color: #ffffff;
    }

    .ant-pagination-item {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
    }

    .ant-pagination-item a {
        color: #ffffff;
    }

    .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-next .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-disabled .ant-pagination-item-link {
        background: rgba(8, 26, 48, 0.8);
        border: 1px solid #0b2f5f;
        color: #707981;
    }

    .ant-pagination-item-active {
        background: #004dfd;
        border-radius: 2px;
        border: none;
    }

    .ant-pagination-jump-prev
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis,
    .ant-pagination-jump-next
        .ant-pagination-item-container
        .ant-pagination-item-ellipsis {
        color: #ffffff;
    }
    .ant-select-selector {
        background-color: transparent !important;
        background: rgba(8, 26, 48, 0.8) !important;
        border: 1px solid #0b2f5f !important;
        color: #ffffff !important;
    }
}
</style>
